<template>
  <MdEditor v-model="contentRef" class="md_container" />
</template>

<script setup lang="ts">
import { ref, defineExpose } from "vue";
import { MdEditor } from "md-editor-v3";
import "md-editor-v3/lib/style.css";

const contentRef = ref("# 标题");

const loadContent = ({ content }) => {
  contentRef.value = content;
};

defineExpose({
  loadContent,
});
</script>

<style lang="scss" scoped>
.md_container {
  width: 100%;
  height: 100%;
}
</style>
